<admintpl file="header"/>
<link href="__PUBLIC__/js/cityPicker/css/city-picker.css" rel="stylesheet"/>
<style>
    .imgs {
        margin-left: 5px;
    }

    .display_none {
        display: none;
    }
</style>
</head>
<script type="text/html" id="photos-item-wrapper">
    <li id="savedimage{id}" style="margin-top:5px;">
        <input id="photo-{id}" type="hidden" name="photos_url[]" value="{filepath}">
        <input id="photo-{id}-name" type="text" name="photos_alt[]" value="{name}" style="width: 200px;" title="图片名称">
        <img id="photo-{id}-preview" src="{url}" style="height:30px;width: 30px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:upload_one_image('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:$('#savedimage{id}').remove();">移除</a>
    </li>
</script>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('lists')}" target="_self">商品列表</a></li>
        <li class="active"><a href="javascript:;">编辑属性</a></li>
    </ul>
    <form action="{:U('editAttr')}" method="post" class="form-horizontal"
          enctype="multipart/form-data">
        <div class="row-fluid">
            <div class="span10">
                <table class="table table-bordered">

                    <tr>
                        <th style="white-space:nowrap;">属性：</th>
                        <td >
                            <volist name="attr" id="vo" key="k">
                                {$vo.attr_name}:
                                ：
                                <input type="hidden" name="post[attr_id][]" value="{$vo.attr_id}">
                                <input type="text" required name="post[detail_name][]" value="{$vo.detail}">属性名称（多个以分隔符"|"分开）
                                <br>
                            </volist>

                        </td>
                    </tr>




</table>
</div>
</div>
<div class="hidden">
<input type="hidden" name="pro_id" value="{$pro_id}">
</div>
        <span style="color: red">*保存将会重置所有规格信息*</span><br>
        <br>
<button class="btn btn-primary js-ajax-submit" type="submit">保存</button>
<a class="btn" href="{:U('index')}">返回</a>
</form>
</div>
</body>
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<!--<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>

<script>

    function reduce(o){
        $(o).parent().parent().remove();
    }

    function add(e) {
        var key = e.attr("name");
        console.log(e);

        var html = '<dt id="size" name="size">'
            +'<dd style="margin-top: 10px">规格描述：<input type="text" name="post['+key+'][option_name][]" required id="" value="" style="width: 180px">'
            +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;"><img onclick="reduce(this)" style="width: 30px;height: 30px;" src="__PUBLIC__/images/reduce.png"></a></dd>'
            +'</dt>'
            +'<dd ></dd>';
        e.before(html);
    }

</script>-->
</html>